﻿<div class="row">
    <div class="col-md-12">
        <h2></h2>
    </div>
    <div class="col-md-12">
        <h2>api-sign</h2>
        <form class="form-inline">
            <div class="forms">
                <div class="form-group">
					<textarea name="json_content" class="form-control input-sm" cols="100" rows="15"></textarea>
                </div>
            </div>
			<div class="forms">
                <div class="form-group">
					<textarea name="private_key" class="form-control input-sm" cols="100" rows="5"></textarea>
                </div>
            </div>
            <div class="row col-md-12">
                <button id="btn_sign" class="btn btn-sm btn-primary" type="button">生成sign</button>
            </div>
			<textarea id="sign" class="form-control input-sm" cols="100" rows="5"></textarea>
        </form>
    </div>
    <div class="col-md-12">
        <h2>hf-sign</h2>
        <form class="form-inline">
            <div class="forms">
                <div class="form-group">
					<textarea name="xml" class="form-control input-sm" cols="100" rows="15">
<?xml version="1.0" encoding="UTF-8"?>
	<HFBankData>
	<head>
		<tranCode>2016</tranCode>
		<tranId>2016101710288806185770</tranId>
		<tranTime>20161020100533</tranTime>
		<platCode>1054</platCode>
		<merNo>5321001078</merNo>
		<signature></signature>
	</head>
	<body>
		<origTranId>2017063010540078294083</origTranId>
		<tranAmt>300000</tranAmt>
		<tranDate>20170630</tranDate>
		<settleDate>20170630</settleDate>
		<tranState>0</tranState>
		<orderId></orderId>
	</body>
</HFBankData>
</textarea>
                </div>
            </div>
            <div class="row col-md-12">
                <button id="btn_hfsign" class="btn btn-sm btn-primary" type="button">生成sign</button>
            </div>
			<textarea id="hfsign" class="form-control input-sm" cols="100" rows="5"></textarea>
        </form>
    </div>
</div>
@section scripts{
    <script type="text/javascript">
        $(function () {
            $('#btn_sign').click(function () {
                $.post('/home/sign', $(this).parents('form').serialize(), function (data) { $('#sign').val(data); });
            });
            $('#btn_hfsign').click(function () {
                $.post('/home/hfsign', $(this).parents('form').serialize(), function (data) { $('#hfsign').val(data); });
            });
        })
    </script>
}
